#define _CRT_SECURE_NO_WARNINGS
#include<iostream>
#include<fstream>
#include<string>
#include<cmath>
#include<cstdlib>
#include<ctime>
#include<vector>
#include<algorithm>
#include"BinaryTree.h"
using namespace std;


void _Set_Handle()
{
	HANDLE hout = GetStdHandle(STD_OUTPUT_HANDLE);

	CONSOLE_CURSOR_INFO cursor;
	GetConsoleCursorInfo(hout, &cursor);

	cursor.bVisible = false;
	SetConsoleCursorInfo(hout, &cursor);
}

#if 1
int main()
{
	//_Set_Handle();
	//TreeNode* root = create_Tree();

	//recursion_PreorderTree(root);

	TreeNode* root = new TreeNode;
	root->val = 1;

	root->left = new TreeNode;
	root->left->val = 2;
	root->left->left = NULL;
	root->left->right = NULL;

	root->left->right = new TreeNode(4);

	root->right = new TreeNode;
	root->right->val = 3;
	root->right->left = NULL;
	root->right->right = NULL;

	//non_recursion_PreorderTree(root);
	//cout << endl;
	
	Filp_Tree(root);
	non_recursion_rearorderTree(root);

	cout << endl << boolalpha << symmery_Tree(root->left, root->right);

 	return 0;
}
#endif




